<template>
	<div class="web-functions">
		<div>
			<Button
				type="primary"
				large
				class="web-functions-new"
				@click="addClick(true)"
				>新建</Button
			>
			<registerModal v-model="modal15" ></registerModal>
		</div>
		<Table border :columns="columns1" :data="data1"></Table>
	</div>
</template>

<script>
import registerModal from '@/views/common-functions/register-modal.vue'
export default {
	name: 'app-functions',
	components: { registerModal },
	props: {},
	data() {
		return {
			modal15: false,
			columns1: [
				// {
				//     title: '顺序',
				//     key: 'order',
				//     width:110,
				//      sortable: true,//排序
				//       align:'center',
				// },
				{
					title: '图标',
					key: 'icon',
					width: 110,
					align: 'center',
					render: (h, params) => {
						let icon = params.row.icon
						console.log(icon)
						return h('div', [
							h('Icon', {
								props: {
									type: icon,
									size: '16',
									//color:'',
									//custor:'',
								},
								style: {
									//marginRight: '5px'
								},
								on: {
									click: () => {},
								},
							}),
						])
					},
				},
				{
					title: '功能名称',
					key: 'function',
				},
				{
					title: '所属系统',
					key: 'system',
				},
				{
					title: '地址',
					key: 'address',
				},
				{
					title: '说明',
					key: 'explain',
				},
				{
					title: '启用',
					key: 'explain',
				},
				{
					title: '操作',
					key: 'action',
							align: 'center',
					key: 'action',
					width: 120,
					render: (h, params) => {
						let color = '#2db7f5'
						return h('div', [
								h(
								'span',
								{
									style: {
										color: color,
										cursor: ' pointer',
										margin:'0 10px 0 0'
									},
									on: {
										click: () => {
						
										},
									},
								},
								'查看'
							),
								h(
								'span',
								{
									style: {
										color: color,
										cursor: ' pointer',
										margin:'0 10px 0 0'
									},
									on: {
										click: () => {
						
										},
									},
								},
								'编辑'
							),
							h(
								'span',
								{
									style: {
										color: color,
										cursor: ' pointer',
									},
									on: {
										click: () => {
						
										},
									},
								},
								'删除'
							),
						])
					},
				},
			],
			data1: [
				{
					order: 2,
					icon: 'md-add',
					system: 'OA系统',
					function: '请假',
					address: 'New2',
					explain: '2016-10-03',
				},
				{
					order: 1,
					icon: 'ios-cafe',
					system: '人力资源系统',
					function: '薪酬预览',
					address: 'New1',
					explain: '2016-10-03',
				},
				{
					order: 3,
					icon: 'md-bus',
					system: '财务共享',
					function: '报销申请',
					address: 'New3',
					explain: '2016-10-03',
				},
				{
					order: 4,
					icon: 'md-clock',
					system: 'OB系统',
					function: '请假',
					address: 'New4',
					explain: '2016-10-03',
				},
			],
		}
	},
	watch: {},
	computed: {
	
	},
	methods: {	addClick(val) {
			this.modal15 = val
		},},
	created() {},
	mounted() {},
}
</script>
<style lang="less" scoped>
.web-functions {
	width: 100%;
	height: 100%;
	overflow-y:scroll;
		background-color: white;
	padding: 24px;
}
.web-functions::-webkit-scrollbar {
  display: none;
}
.web-functions-new {
	margin-bottom: 15px;
}
</style>